package com.ruoyi.seedlingSys.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.seedlingSys.mapper.CaishouMapper;
import com.ruoyi.seedlingSys.domain.Caishou;
import com.ruoyi.seedlingSys.service.ICaishouService;

/**
 * 采收管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-11
 */
@Service
public class CaishouServiceImpl implements ICaishouService 
{
    @Autowired
    private CaishouMapper caishouMapper;

    /**
     * 查询采收管理
     * 
     * @param caiShouID 采收管理主键
     * @return 采收管理
     */
    @Override
    public Caishou selectCaishouByCaiShouID(Long caiShouID)
    {
        return caishouMapper.selectCaishouByCaiShouID(caiShouID);
    }

    /**
     * 查询采收管理列表
     * 
     * @param caishou 采收管理
     * @return 采收管理
     */
    @Override
    public List<Caishou> selectCaishouList(Caishou caishou)
    {
        return caishouMapper.selectCaishouList(caishou);
    }

    /**
     * 新增采收管理
     * 
     * @param caishou 采收管理
     * @return 结果
     */
    @Override
    public int insertCaishou(Caishou caishou)
    {
        caishou.setCreateTime(DateUtils.getNowDate());
        return caishouMapper.insertCaishou(caishou);
    }

    /**
     * 修改采收管理
     * 
     * @param caishou 采收管理
     * @return 结果
     */
    @Override
    public int updateCaishou(Caishou caishou)
    {
        caishou.setUpdateTime(DateUtils.getNowDate());
        return caishouMapper.updateCaishou(caishou);
    }

    /**
     * 批量删除采收管理
     * 
     * @param caiShouIDs 需要删除的采收管理主键
     * @return 结果
     */
    @Override
    public int deleteCaishouByCaiShouIDs(Long[] caiShouIDs)
    {
        return caishouMapper.deleteCaishouByCaiShouIDs(caiShouIDs);
    }

    /**
     * 删除采收管理信息
     * 
     * @param caiShouID 采收管理主键
     * @return 结果
     */
    @Override
    public int deleteCaishouByCaiShouID(Long caiShouID)
    {
        return caishouMapper.deleteCaishouByCaiShouID(caiShouID);
    }
}
